<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    /**
     * 函数/方法
     * 函数:在JavaScript中通过function默认定义一个结构
     * 方法:将函数对象放到对象中
    */
    var person = {
      name: "why",
      age: 18,
      height: 1.88,
      run: function () {
        console.log("running")
      },
      eat: function () {
        console.log("eat foods")
      },
      study: function () {
        console.log("studying")
      }
    }
  </script>
</body>

</html>